<?php
	include 'ZionHeader.inc';
?>

<html>
<body>
<h1>Updated Announcement!</h1>

<?php
$Make = $_POST['make'];
$Model = $_POST['model'];
$Year = $_POST['year'];
$Price = $_POST['price'];
$Vin = $_POST['vin'];
$Cylinder = $_POST['cylinder'];
$Drive = $_POST['drive'];
$Color = $_POST['color'];
$Description = $_POST['description'];
$Mileage = $_POST['mileage'];
$NumOfDoors = $_POST['numberofdoors'];
$Photo = $_POST['photo'];

include 'DatabaseConnect.inc';

$query = "UPDATE Vehicle SET Price='$Price', Cylinder = '$Cylinder', Drive = '$Drive', Color ='$Color', Description = '$Description', Mileage = '$Mileage', Photo = '$Photo', Make = '$Make', Model = '$Model', Year = '$Year', NoDoors = '$NumOfDoors' WHERE VIN = '$Vin'";

mysql_query($query);

$query = "SELECT * from Vehicle WHERE VIN = '$Vin'";

$result = mysql_query($query);
//$row = mysql_fetch_array($result);

//$username = $_SESSION['UName'];

//$time = date(DATE_RFC822);

//$query = "Alter Announcement ( Timestamp, vehicle_ID, userID) Values ('$time', '".$row['ID']."', '$username')";

//mysql_query($query);

mysql_close();

?>

<h1>Announcement has been updated!</h1>
<br />
<br />
<a href="announcement.php">Return To Index</a>


</body>
</html>

